﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;

namespace HCQ2_Model.VRDD.InputDto._0714
{
    /// <summary>
    ///  保存店铺用户等级配置
    /// </summary>
    public class InputUserLevelStore
    {
        /// <summary>
        ///  用户id
        /// </summary>
        [RegularExpression("^([1-9][0-9]*)$", ErrorMessage = "用户id必传项！")]//大于0正则表达式
        public int user_id { get; set; }
        /// <summary>
        ///  店铺id
        /// </summary>
        [RegularExpression("^([1-9][0-9]*)$", ErrorMessage = "店铺id必传项！")]//大于0正则表达式
        public int store_id { get; set; }
        /// <summary>
        ///  用户等级
        /// </summary>
        [RegularExpression("^([1-9][0-9]*)$", ErrorMessage = "用户等级必须是大于零的整数！")]//大于0正则表达式
        public int user_level { get; set; }
        /// <summary>
        ///  销售额最小值
        ///  保留2位小数
        /// </summary>
        public decimal min_sale { get; set; }
        /// <summary>
        ///  销售额最大值
        ///  保留2位小数
        /// </summary>
        public decimal max_sale { get; set; }
        /// <summary>
        ///  下线最小值
        /// </summary>
        public int min_line { get; set; }
        /// <summary>
        ///  下线最大值
        /// </summary>
        public int max_line { get; set; }
        /// <summary>
        ///  商品折扣【0-10】 规则：大于0小于等于10的整数或小数，小数后最多只能有一位！
        /// </summary>
        [RegularExpression("^10$|^[0-9]([.][0-9]{0,1})?$", ErrorMessage = "折扣率必须大于0小于等于10的整数或小数，小数后最多只能有一位！")]
        public decimal rate { get; set; }
        /// <summary>
        ///  备注
        /// </summary>
        public string note { get; set; }
    }
    /// <summary>
    ///  更新店铺的用户等级配置
    /// </summary>
    public class InputModifyUserLevelStore
    {
        /// <summary>
        ///  配置id
        /// </summary>
        [RegularExpression("^([1-9][0-9]*)$", ErrorMessage = "配置id必传项！")]//大于0正则表达式
        public int id { get; set; }
        /// <summary>
        ///  用户id
        /// </summary>
        [RegularExpression("^([1-9][0-9]*)$", ErrorMessage = "用户id必传项！")]//大于0正则表达式
        public int user_id { get; set; }
        /// <summary>
        ///  用户等级
        /// </summary>
        [RegularExpression("^([1-9][0-9]*)$", ErrorMessage = "用户等级必须是大于零的整数！")]//大于0正则表达式
        public int user_level { get; set; }
        /// <summary>
        ///  销售额最小值
        ///  保留2位小数
        /// </summary>
        public decimal min_sale { get; set; }
        /// <summary>
        ///  销售额最大值
        ///  保留2位小数
        /// </summary>
        public decimal max_sale { get; set; }
        /// <summary>
        ///  下线最小值
        /// </summary>
        public int min_line { get; set; }
        /// <summary>
        ///  下线最大值
        /// </summary>
        public int max_line { get; set; }
        /// <summary>
        ///  商品折扣
        ///  保留1位小数
        /// </summary>
        public decimal rate { get; set; }
        /// <summary>
        ///  备注
        /// </summary>
        public string note { get; set; }
    }
}